<!DOCTYPE html>
<html>
<head>
  <title>AIESEC Cairo University</title>
     <%= stylesheet_link_tag "redactor", :medio => "all"%>

  <%= stylesheet_link_tag    "bootstrap", :media => "all" %>
  <%= javascript_include_tag "jquery-1.7.min" %>
  <%= javascript_include_tag "redactor" %>
  <%= javascript_include_tag "bootstrap" %>
  <%= javascript_include_tag "twitter-bootstrap-hover-dropdown" %>
  <%= javascript_include_tag "twitter-bootstrap-hover-dropdown.min" %>
  <%= csrf_meta_tags %>
</head>
<body style="background-color:#f3f3f3;">
	<header>
		<div class="container">
			<% keys = flash.keys %>
			<% keys.each do |key| %>
	  	<% fl = flash[key] %>
	  	<% if fl == "" then next end %>
	  	<% color = fl["$red"] || fl["$green"] || fl["$yellow"] || fl["$blue"]%>
	  	<% if color %>
	    <% fl[color] = "" %>
	  	<% else %>
	    <% color = "$yellow" %>
	  	<% end %>
	  	<div class="flash-<%= color[1,10] %> well" id="notification"> <!-- assigning css color class triming tailing $ -->
	  	<%= raw fl %>
	  	<% flash[key] = "" %>
	  	</div>
			<% end %>
			<%= image_tag("blue_on_white_short.png", :size => "400x400") %>
			<div style="width:100px;height:30px;float:right;margin-top:20px;margin-left:30px"">
				<%= link_to image_tag("facebook.png",:size => "30x30"), "http://www.facebook.com/AIESEC.CairoUniversity", :target => "_blank" %>
				<%= link_to image_tag("twitter.png",:size => "30x30"), "https://twitter.com/AIESECCU", :target => "_blank" %>
				<%= link_to image_tag("youtube.png",:size => "30x30"), "http://www.youtube.com/user/aieseccueg", :target => "_blank" %>

			</div>
			<div style="float:right;margin-top:25px">
				<% if current_admin %>
				You are currently logged in as <%= current_admin.login %> | <%= link_to("Logout", logout_path)%>
				<% end %>
			</div>
		</div>
	</header>
	<div class="container">
		<div style="margin:auto;display:table;">
			<ul class="nav nav-pills">
    	<li><a href="#">Home</a></li>
    	 <li class="dropdown">
                <a class="dropdown-toggle" id="drop5" role="button" data-hover="dropdown" data-toggle="dropdown" href="#">Programs<b class="caret"></b></a>
                <ul id="menu3" class="dropdown-menu" role="menu" aria-labelledby="drop5">
                	 <% @allPrograms.each do |program| %>
                  <li><%= link_to(program.name, :controller => "programs", :action => "show", :id => program.id) %></li>
                 
                  <% end %>
                </ul>
              </li>
    	 <li class="dropdown">
                <a class="dropdown-toggle" id="drop5" role="button" data-toggle="dropdown" href="#">Projects<b class="caret"></b></a>
                <ul id="menu3" class="dropdown-menu" role="menu" aria-labelledby="drop5">
                	 <% @allProjects.each do |project| %>
                	 <% if project.exchange == 0  && project.program == 3 %>
                  <li><%= link_to(project.name.html_safe, :controller => "projects", :action => "show", :id =>project.id) %></li>
                 <% end %>
                  <% end %>
                </ul>
              </li>
			<li><%= link_to("Events", :controller => "events", :action => "index") %></li>
			<li><a href="#">About</a></li>
    	</ul>
		</div>

</br>

<%= yield %>

<footer>
	<div class="container">
		<div style="background-color:white;display:table;height:100px;width:105%;margin-top:60px;border:1px solid black;border-radius:5px;margin-bottom:50px" >
		
			<div style="color:black;vertical-align:top;padding:20px;padding-top:25px;padding-left:40px;display:table-cell;width:50px">
				<h3>Our Partners:</h3>
			</div>	

			<div style="width:75%;height:80px;display:table-cell" align="left">
				<div style="padding:15px;padding-left:0px">

					<% Partner.all.each do |p| %>
					<div style="margin-left:50px;horizontal-align:center;background-color:white;display:inline-block;border-radius:8px">
						<a href="<%= p.page_link %>"><%= image_tag(p.photo.url, :class => "img-rounded") %></a>
					</div>
					<% end %>



				</div>
			</div>	

		</div>
	</div>
</footer>

</div>
</body>

</html>
